//
//  DatabaseManager.h
//  project
//
//  Created by lc on 16/5/19.
//  Copyright © 2016年 lc. All rights reserved.
//

//数据库管理类:单利
//利用Runtime机制,实现通用数据库存储
#import <Foundation/Foundation.h>

@interface DatabaseManager : NSObject


+ (instancetype)defaultManager;

/**创建数据库表*/
- (BOOL)cretatTableFromClass:(Class)tabeleClass;
/**添加数据*/
- (BOOL)insertObject:(id)obj;
/**删除数据*/
- (BOOL)deleteObject:(id)obj;

/**查询所有数据*/
- (NSArray *)selectAllObjectFromClass:(Class)tableClass;
/**判断摸个数据在数据库表中是否存在*/
- (BOOL)isExistWithObject:(id)obj;
/**删除所有数据*/
- (BOOL)deleteAllObject:(Class)tableClass;

@end
